<template>
    <view class="content">
        <view class="nav">
			<view class="nav-i" :class="{active : type == 1}" @click="chooseNav(1)">待发货</view>
			<view class="nav-i" :class="{active : type == 2}" @click="chooseNav(2)">待收货</view>
			<view class="nav-i" :class="{active : type == 3}" @click="chooseNav(3)">已完成</view>
		</view>
		
		<view class="wrapper">
			<view class="item" v-for="(item, index) in 3" :key="index" @click="toDetails(item)">
				<view class="item-top">
					<image src="../../static/del/16.png" class="img"></image>
					<view class="u-flex-1">
						<view class="name u-line-2">美的（Midea）T-L326B家用多功能电烤箱 家用多功能 35升家用多功能电烤箱家用电烤箱</view>
						<view class="price">
							<image src="../../static/icon/point_2.png" class="point-2"></image>
							<view>2690</view>
						</view>
					</view>
				</view>
				
				<view class="down">
					<view class="u-p-r-8">实付:</view>
					<image src="../../static/icon/point_2.png" class="point-2"></image>
					<view class="d-price">2690</view>
				</view>
				<view class="btns">
					<view class="wl-btn">查看物流</view>
					<view class="sh-btn">确认收货</view>
				</view>
			</view>
		</view>
    </view>
</template>

<script>
    export default {
        data() {
            return {
                type: 1,
            };
        },
        onLoad() {
            
        },
        methods: {
            chooseNav(num) {
				this.type = num
			},
			
			toDetails(item) {
				this.$gTo(`/pages/point-order/p-order-details?id=${item.id}`)
			},
        }
    };
</script>

<style lang="scss">
	
    page{
        background-color: #f5f5f5;
    }
	.nav{
		display: flex;
		justify-content: space-between;
		align-items: center;
		background-color: #fff;
	}
	.nav-i{
		width: calc(100vw / 3);
		text-align: center;
		font-size: 30rpx;
		padding: 25rpx 0;
	}
	.active{
		color: #2558ab;
		position: relative;
	}
	.active::after{
		display: block;
		content: '';
		width: 32rpx;
		height: 8rpx;
		background-color: #2558ab;
		position: absolute;
		bottom: 0;
		left: 50%;
		transform: translateX(-50%);
	}
	
	.wrapper{
		padding: 20rpx 10rpx;
	}
	.item{
		background-color: #fff;
		border-radius: 20rpx;
		padding: 30rpx 20rpx;
		margin-bottom: 20rpx;
	}
	.item-top{
		display: flex;
		justify-content: space-between;
		align-items: center;
	}
	.img{
		width: 180rpx;
		height: 180rpx;
		border: 2rpx solid #e6e6e6;
		border-radius: 10rpx;
		margin-right: 18rpx;
	}
	.name{
		font-size: 28rpx;
		font-weight: bold;
	}
	.price{
		padding-top: 30rpx;
		display: flex;
		justify-content: flex-start;
		align-items: center;
		font-size: 32rpx;
		font-weight: bold;
	}
	.point-2{
		width: 17rpx;
		height: 19rpx;
		margin-right: 8rpx;
	}
	.down{
		display: flex;
		justify-content: flex-end;
		align-items: center;
	}
	.d-price{
		font-size: 38rpx;
		font-weight: bold;
	}
	.btns{
		display: flex;
		justify-content: flex-end;
		align-items: center;
		padding-top: 18rpx;
		font-size: 28rpx;
	}
	.btns>view{
		padding: 12rpx 24rpx;
		margin-left: 20rpx;
		border-radius: 50rpx;
		box-sizing: border-box;
	}
	.wl-btn{
		color: #000;
		border: 2rpx solid #000;
	}
	.sh-btn{
		color: #f76d0a;
		border: 2rpx solid #f76d0a;
	}

</style>
